home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / New System Software Extensions / SCSI Manager 4.3f1 / Header files / SCSIStandard.h < prev   
Encoding:
C/C++ Source or Header  |  1993-09-28  |  2.2 KB  |  79 lines  |  [TEXT/MPS ]

  1. /************************************************************
  2.  
  3.     File:        SCSIStandard.h
  4.  
  5.     Contains:    Commonly used structures and values from SCSI standard
  6.  
  7.     Copyright:    © 1990-1993 by Apple Computer, Inc., all rights reserved.
  8.  
  9. ************************************************************/
  10.  
  11.  
  12. #ifndef __SCSIStandard__
  13. #define __SCSIStandard__
  14.  
  15.  
  16. /********************************************************************/
  17. // General SCSI stuff
  18. /********************************************************************/
  19.  
  20. // SCSI status
  21.  
  22. #define    scsiStatGood            0x00        // Good Status
  23. #define    scsiStatCheckCondition    0x02        // Check Condition
  24. #define scsiStatConditionMet    0x04        // Condition Met
  25. #define    scsiStatBusy            0x08        // Busy
  26. #define scsiStatIntermediate    0x10        // Intermediate
  27. #define scsiStatIntermedMet        0x14        // Intermediate - Condition Met
  28. #define scsiStatResvConflict    0x18        // Reservation conflict
  29. #define scsiStatTerminated        0x20        // Command terminated
  30. #define scsiStatQFull            0x28        // Queue full
  31.  
  32.  
  33. // SCSI messages
  34.  
  35. typedef enum {    kCmdCompleteMsg = 0,
  36.                 kExtendedMsgCode,                // 0x01
  37.                 kSaveDataPointerMsg,            // 0x02
  38.                 kRestorePointersMsg,            // 0x03
  39.                 kDisconnectMsg,                    // 0x04
  40.                 kInitiatorDetectedErrorMsg,        // 0x05
  41.                 kAbortMsg,                        // 0x06
  42.                 kMsgRejectMsg,                    // 0x07
  43.                 kNoOperationMsg,                // 0x08
  44.                 kMsgParityErrorMsg,                // 0x09
  45.                 kLinkedCmdCompleteMsg,            // 0x0a
  46.                 kLinkedCmdCompleteWithFlagMsg,    // 0x0b
  47.                 kBusDeviceResetMsg,                // 0x0c
  48.                 kAbortTagMsg,                    // 0x0d
  49.                 kClearQueueMsg,                    // 0x0e
  50.                 kInitiateRecoveryMsg,            // 0x0f
  51.                 kReleaseRecoveryMsg,            // 0x10
  52.                 kTerminateIOProcessMsg,            // 0x11
  53.                 kSimpleQueueTag =  0x20,        // 0x20
  54.                 kHeadOfQueueTagMsg,                // 0x21
  55.                 kOrderedQueueTagMsg,            // 0x22
  56.                 kIgnoreWideResidueMsg            // 0x23
  57.     } SCSI1stMsg;
  58.                 
  59.  
  60. // SCSI Phases    - 1st 8 phases (thru MessageInPhase) are straight off the chip's phase bits
  61.  
  62. typedef enum {    kDataOutPhase,            // 0
  63.                 kDataInPhase,            // 1
  64.                 kCommandPhase,            // 2
  65.                 kStatusPhase,            // 3
  66.                 kPhaseIllegal0,
  67.                 kPhaseIllegal1,
  68.                 kMessageOutPhase,        // 6
  69.                 kMessageInPhase,        // 7
  70.                 
  71.                 kBusFreePhase,            // 8
  72.                 kArbitratePhase,        // 9
  73.                 kSelectPhase,            // 0xA
  74.                 kMessageInPhaseNACK,    // 0xB
  75.             kSCSIphaseBogus = 256
  76.     } SCSIphase;
  77.  
  78.  
  79. #endif //__SCSIStandard__